package cn.school.controller.app;

import cn.school.common.api.CommonResult;
import cn.school.prevention.entity.FeedBack;
import cn.school.student.entity.StudentInfo;
import cn.school.student.service.StudentInfoService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/app/classStudent")
public class ClassStudentController {
    @Resource
    private StudentInfoService studentInfoService;

    @ApiOperation("updateStudentType => 修改学生状态")
    @PostMapping("/updateStudentType")
    public CommonResult<Integer> updateStudentType(@RequestBody StudentInfo StudentInfo) {
        boolean b = studentInfoService.updateById(StudentInfo);
        return b?CommonResult.success():CommonResult.failed("修改失败");
    }
}
